-- GENERATED SPELL FOR [Ethereum Overlord] --


function spell0_20459(pUnit, Event) --@Battle Shout,Self--
pUnit:FullCastSpellOnTarget(32064,pUnit)
pUnit:RegisterEvent('Sorts_20459', 611, 1)
end

function spell1_20459(pUnit, Event) --@Charge,n/a--
pUnit:FullCastSpellOnTarget(36509,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_20459', 2292, 1)
end

function spell2_20459(pUnit, Event) --@Enchanted Weapons,n/a--
pUnit:FullCastSpellOnTarget(36510,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_20459', 30000, 1)
end

function spell3_20459(pUnit, Event) --@Shadowsurge,n/a--
pUnit:FullCastSpellOnTarget(36517,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_20459', 610, 1)
end

function spell4_20459(pUnit, Event) --@Shadowtouched,Self--
pUnit:FullCastSpellOnTarget(36515,pUnit)
pUnit:RegisterEvent('Sorts_20459', 604, 1)
end

function Sorts_20459(pUnit, Event)
local choix_sorts_20459 = math.random(0, 4)
if choix_sorts_20459 == 0 then
pUnit:RegisterEvent('spell0_20459', 1, 1)
end
if choix_sorts_20459 == 1 then
pUnit:RegisterEvent('spell1_20459', 1, 1)
end
if choix_sorts_20459 == 2 then
pUnit:RegisterEvent('spell2_20459', 1, 1)
end
if choix_sorts_20459 == 3 then
pUnit:RegisterEvent('spell3_20459', 1, 1)
end
if choix_sorts_20459 == 4 then
pUnit:RegisterEvent('spell4_20459', 1, 1)
end
end

function mob20459_Action(pUnit, Event)
pUnit:RegisterEvent('Sorts_20459', math.random(1500, 3000), 1)
end

function mob20459_Leave(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob20459_Kill(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob20459_Die(pUnit, Event)
pUnit:RemoveEvents();
end

RegisterUnitEvent(20459, 1, 'mob20459_Action')
RegisterUnitEvent(20459, 2, 'mob20459_Leave')
RegisterUnitEvent(20459, 3, 'mob20459_Kill')
RegisterUnitEvent(20459, 4, 'mob20459_Die')
